﻿package baseEngine.materials
{
    import baseEngine.core.*;
    import baseEngine.system.*;
    import flash.display3D.*;
    import flash.events.*;

    public class Material3D extends EventDispatcher
    {
        private var _name:String;
        public static const factorList:Array = [Context3DBlendFactor.ONE, Context3DBlendFactor.ZERO, Context3DBlendFactor.SOURCE_COLOR, Context3DBlendFactor.SOURCE_ALPHA, Context3DBlendFactor.DESTINATION_COLOR, Context3DBlendFactor.DESTINATION_ALPHA, Context3DBlendFactor.ONE_MINUS_SOURCE_COLOR, Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA, Context3DBlendFactor.ONE_MINUS_DESTINATION_COLOR, Context3DBlendFactor.ONE_MINUS_DESTINATION_ALPHA];

        public function Material3D(param1:String = "")
        {
            this.name = param1;
            return;
        }// end function

        public function get name() : String
        {
            return this._name;
        }// end function

        public function set name(param1:String) : void
        {
            if (param1 == null || param1.length == 0)
            {
                trace("please Name Material");
            }
            this._name = param1;
            return;
        }// end function

        public function dispose() : void
        {
            return;
        }// end function

        public function validate(param1:Surface3D) : Boolean
        {
            return true;
        }// end function

        public function clone() : Material3D
        {
            var _loc_1:* = new Material3D(this.name);
            _loc_1.name = this.name;
            return _loc_1;
        }// end function

        public function draw(param1:Pivot3D, param2:Surface3D, param3:String, param4:String, param5:Boolean, param6:String, param7:String, param8:int = 0, param9:int = -1) : void
        {
            if (!param1.scene)
            {
                return;
            }
            var _loc_10:* = Global3D;
            var _loc_11:* = Global3D.drawCalls3d + 1;
            _loc_10.drawCalls3d = _loc_11;
            Global3D.trianglesDrawn = Global3D.trianglesDrawn + param9;
            return;
        }// end function

    }
}
